<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
<body>
<form class="layui-form" action="">
    <div class="mainBox">
        <div class="main-container">
			
			<div class="layui-form-item">
				<label class="layui-form-label">客户等级</label>
				<div class="layui-input-block">
				  <select name="gid"  lay-verify="required">
					<option value=""></option>
					{volist name="grade" id="v"}
					{if !$action_up}
					<option value="{$v.id}" {if ($v.id==2)}selected="selected"{/if}>{$v.name}</option>
					{elseif $v.id == $model.gid}
					<option value="{$v.id}" selected="selected">{$v.name}</option>
					{else/}
					<option value="{$v.id}">{$v.name}</option>
					{/if}
					{/volist}
				  </select>
				</div>
			</div>
            
			<div class="layui-form-item">
				<label class="layui-form-label">客户昵称</label>
				<div class="layui-input-block">
				  <input type="text" name="name" value="{$model.name??''}" placeholder="请输入客户昵称" class="layui-input"  verify="must">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">公司名</label>
				<div class="layui-input-block">
				  <input type="text" name="company" value="{$model.company??''}" placeholder="请输入公司名" class="layui-input" >
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">电话号码</label>
				<div class="layui-input-block">
				  <input type="text" name="phone" value="{$model.phone??''}" placeholder="请输入电话号码" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">旺旺ID</label>
				<div class="layui-input-block">
				  <input type="text" name="wangid" value="{$model.wangid??''}" placeholder="请输入旺旺ID" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">QQ号</label>
				<div class="layui-input-block">
				  <input type="text" name="qq" value="{$model.qq??''}" placeholder="请输入QQ号" class="layui-input" >
				</div>
			</div>
			
			<div class="layui-form">
				<div class="layui-form-item" id="area-picker">
					<div class="layui-form-label">省市区</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="province" class="province-selector" data-value="{$model.province??''}">
							<option value="">请选择省</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="city" class="city-selector" data-value="{$model.city??''}">
							<option value="">请选择市</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="area" class="county-selector" data-value="{$model.area??''}">
							<option value="">请选择区</option>
						</select>
					</div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">地址</label>
				<div class="layui-input-block">
				  <input type="text" name="address" value="{$model.address??''}" placeholder="请输入地址" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block">
					<input type="checkbox" lay-skin="switch" value="status" lay-text="启用|禁用" {if $model.status??1 == 1} checked {/if}><input type="hidden" name="status" value="{$model.status??1}">
				</div>
			</div>

        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save" verify="submit">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
	layui.use(['form', 'jquery', 'uploads','common','mycomm','area'], function () {
		let form = layui.form;
		let $ = layui.jquery;
		let common = layui.common;
		let mycomm = layui.mycomm;
		let area = layui.area;
	
		mycomm.editSubmit();
		
		area.render({
			elem: '#area-picker',
			change: function(res) {
				
			}
		});
		
	})
</script>
{$LOAD_STYLE.bottom|raw}

</body>
</html>